﻿@model HomeCareLibrary.Models.TipsModel 
<div class="tab-pages tips-tab">
            
              <div class="top-tittle-panel hidden-phone">
                <h4>Personalized for @Model.homename</h4>
              </div>
              <div class="title clearfix mobile-top-head">
                <h1>Helpful Tips</h1>
                   <p>@Model.selectedmonth @Model.selectedyear</p>
                
                  @if (ViewBag.getSingleHomeName != null)
                  {<div class="top-right-panel">
                      <div class="top-right-panel-bg" style="cursor: pointer;" data-toggle="modal" data-target="#myModalAll111"><span>Home</span> <span class="right">
                          <img src="@Url.Content("~/images/mtt-images/icon-menu.png")"></span> </div>
                </div>
                  }
              </div>
   
 
  
    <div class="top-tittle-panel visible-phone">
                <h4>Personalized for @Model.homename</h4>
              </div>
              <div class="main-content">
                <div class="mtt-bg">
                  <div class="group-mtt-outer">
                   @{string tip_code="";
                       foreach (var Mainitem in Model.listTipsModel.OrderByDescending(x => x.tip_priority))
                                                                {
                                                                    tip_code +=Mainitem.tip_code + ",";
                       <div class="panel-group-mtt clearfix">
                        <div class="media">
                            <a class="ACR-img" href="javascript:void(0);">
                     
                           <img style="cursor:default;" src="@Url.Content("~/"+Mainitem.display_icon_code)" alt="@Mainitem.display_icon_code">
                                          </a>
                        <div class="media-body">
                        <div class="left-group-panel">
                          <h4 class="media-heading">@Mainitem.tip_title</h4>
                          <div class="icon-mtt clearfix">
                            <div class="star pull-left">
                               
                                <img  src="@Url.Content("~/images/mtt-images/"+ @Mainitem.tip_priority +"_star.png")" alt="@Mainitem.tip_priority">
                            </div>
                                        <div class="arrow-icon tips-Detail-Page" data-code="@Mainitem.tip_code" data-display_icon_code="@Mainitem.display_icon_code"  
                                data-tip_title="@Mainitem.tip_title" data-tip_content="@Mainitem.tip_content" data-tip_priority="@Mainitem.tip_priority" data-tip_type="@Mainitem.tip_type" data-tip_benefit_content="@Mainitem.tip_benefit_content" data-tip_energy_savings_score="@Mainitem.tip_energy_savings_score" data-tip_energy_savings_content="@Mainitem.tip_energy_savings_content" data-tip_cost_score="@Mainitem.tip_cost_score" data-tip_cost_content="@Mainitem.tip_cost_content" data-tip_more_info_link="@Mainitem.tip_more_info_link" data-tip_knowledge_level="@Mainitem.tip_knowledge_level" data-tip_score="@Mainitem.tip_score" data-TGMS="@Mainitem.TGMS" data-benefits_str="@Mainitem.benefits_str" data-tip_excluded_features="@Mainitem.tip_excluded_features" data-monthyear="@Model.selectedmonth @Model.selectedyear">
                                            <a href="javascript:void(0);">
                                                <img alt="arrow-img"  src="@Url.Content("~/images/mtt-images/arrow-img.png")" class="img-responsive"></a>
                          </div>
                                    </div>
                           @{int count = 0;
                             count = @Mainitem.tip_content.Count();
                               }
                            
                             <p>
                                 @if(count>60)
                                {
                            
                                            <span style="font-size: 12px;">@Mainitem.tip_content </span>
                                 }
                                else
                                {
                                   @Mainitem.tip_content
                                }

                          </p>
                        </div>
                        
                        </div>
                      </div>
                    </div>
                       }
                       <input type="hidden" value="@tip_code" id="hdnTipCode" />
                       }
                  </div>

                      @if (ViewBag.noRecords != string.Empty)
                    {
                    
                <span style="text-align: center; color: red; padding-top: 10px; display: block">
                            @ViewBag.noRecords</span>
                    }
                    
                    
                  <div class="btm-task">
                <p class="text-center">No the perfect ideas for you? Then just change your personalization choices. </p>
                  </div>
                  <br>
            @*<div class="mtt-button"><a id="btnTipsPersonalize" class="btn-per" href="@Url.Action("Index", "Personalization")" >Personalize</a> </div>*@
                   
                <div class="mtt-button"> @if (Session["mode"] != null && Session["mode"] == "androidApp")
{
    <button type="button" id="btnTaskPersonalize" class="btn-per" onclick="personalise();">Personalize</button>
}
else
{
    <a class="btn-per" href="@Url.Action("UpdatePersonalization", "Personalization")">Personalize</a>
}</div>
                    
                      <br />
                     @if (Session[HomeCareLibrary.Constants.SessionConstants.SPONSOR_DETAILS]!=null)
    
 {

     {
         var getSponsorDetail = (HomeCareLibrary.Core.Dtos.SponsorInputs345xDto)Session[HomeCareLibrary.Constants.SessionConstants.SPONSOR_DETAILS];
         <div class="personalization-data sponsor-screen-additional">
          <div class=" sponsor_data clearfix">
              <div class="dataset clearfix">
                <div class="header_img">
                <p>@getSponsorDetail.Spon_YourName<br>
                   @getSponsorDetail.Spon_PhoneBan<br>
                                    <small>@getSponsorDetail.Spon_Email</small><br>
                                    <small>@getSponsorDetail.Spon_Web_Add</small>
                                </p>
                </div>
                
                <div class="popup_footer_bg">
              </div>
                        </div>
                    </div>
                </div>
                         }
 } 
                 

                
                    <br />
                    

                     Session Ids with values:
                      @if (ViewBag.sessionIds != string.Empty)
                   {
                      @ViewBag.sessionIds
                   }
            <br />
            <br />

            <span>Session:
                    @if (ViewBag.getSession != string.Empty)
                   {
                      @ViewBag.getSession
                   }
                      </span>


            <br />
            <br />
                    
                     JSON:
                   @if (ViewBag.JsonString != string.Empty)
                   {
                       <h4>@ViewBag.JsonString</h4>
                   }

            <br />
            <br />
            <span style="margin-left: 10px;">Request Content-Type:
                    @if (ViewBag.ContentType != string.Empty)
                   {
                      @ViewBag.ContentType
                   }
                      </span>

            <br />
            <br />
            <span style="margin-left: 10px;">Request URL:
                    @if (ViewBag.Url != string.Empty)
                   {
                      @ViewBag.Url
                   }
                      </span>
                  
                  <div class="visible-phone sponsor_data sponsor_data-btm">
              @if (Session[HomeCareLibrary.Constants.SessionConstants.PROMO_CODE] != null)
                                              {
                                              <div class="sponsor_data sponsor_data-btm">
                                                  @Html.Partial("SponsorDetailMobileView");
                                                  </div>
                                              }
            </div>
                  </div>
              </div>
    <div class="modal fade tip-popup" id="myModalAll111" tabindex="-1" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
    
      <div class="modal-body">
            <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title" style="text-align: center;" id="myModalLabel1">Home</h4>
         
       
      </div>
        <div class="row">
            <div class="col-md-6 col-sm-6 col-xs-6">
          Home:
           </div>
      </div>
          <div class="row">
               <div class="col-md-6 col-sm-6 col-xs-6">
           @Html.DropDownList("getHomeNameTip", null, new { @class = "form-control" })
            </div>

          </div>
             
      <div class="modal-footer">
       
                        <button type="button" style="float: left;" class="btn btn-default" data-dismiss="modal" id="btnMYDoneTipCancel">Cancel</button>
                        <button style="float: right;" type="button" class="btn btn-default" data-dismiss="modal" id="btnMYDoneTipDone">Done</button>&nbsp;&nbsp;
      
      </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
    </div>


    <input type="hidden" value="@Session[HomeCareLibrary.Constants.SessionConstants.MODE]" id="hdnSessionValue" />
            </div>


<div class="detail-page-task  detail-page-tipsdetail"  style="display: none;">
            <div class="tab-pages detail-page-inn">
             
              
              <div class="title clearfix">
                
                <h1>Tip Detail</h1>
                 <p>@Model.selectedmonth @Model.selectedyear</p>
                <div class="top-btn-per clearfix">
                <div class="back-button" id="back-buttonTipsDetail">
                    <a href="javascript:void(0);">
                        <img src="@Url.Content("~/images/personalization-images/back-btn.png")" alt="back-btn" class="back-btn">
                        <!--<img class="back-mob-btn" alt="back-mob-btn" src="images/personalization-images/back-mob-btn.png">-->
                        <div class="back-mob-btn backToTips"><span class="glyphicon glyphicon-chevron-left"></span>Back</div>
                    </a>
                </div>
                <div class="ques-button"><a href="#">
                    <img alt="ques-btn" src="@Url.Content("~/images/personalization-images/ques-btn.png")" class="ques-bt">
                    <img alt="ques-btn" src="@Url.Content("~/images/personalization-images/mobques-btn.png")" class="mobques-bt">
                        </a></div>
                    </div>
              </div>
              <div class="main-content">
                <div class="mtt-bg">
                <div class="top-icon-admin-extra clearfix">
                
                   @* <div class="top-right-panel">
                        <img alt="" src="@Url.Content("~/images/customTask-img/custom-task.png")">
                    </div>*@
                </div>
                  <div class="group-mtt-outer">
                    <div class="panel-group-mtt clearfix">
                        <div class="media">
                            <a href="javascript:void(0);" class="ACR-img">
                                <img id="tipImage" src="@Url.Content("~/images/customTask-img/customize-img.png")" alt="task-img1">
                            </a>
                        <div class="media-body">
                                <h4 class="media-heading" id="tipTitle"></h4>
                          
                                <p id="tipContent">
                                   
                                </p>
                            <div class="detail-panel clearfix">
                        <ul class="list-unstyled">
                                        <li><small class="">Priority:</small><span>
                                            <img id="tipPriority" src="@Url.Content("~/images/detail-page-img/star3-d.png")" alt=""></span></li>
                                        <li><small class="">Type:</small><span id="tipType"> inside</span></li>
                        </ul>
                        </div>
                               @* <div class="timming"><small>Recommended Timing:</small> <span>Once per year, suggested do in February</span></div>*@
                        </div>
                        
                       

                      </div>
                    </div>
                    <div class="detail-pagetab">

      <ul class="nav nav-tabs" id="myTab">
        <li class="active benefits"><a data-toggle="tab" href="#detailtab1">Benefits</a></li>
                            <li class="cost"><a data-toggle="tab" href="#detailtab2">Cost</a></li>
                           @* <li class="helpful-products"><a data-toggle="tab" href="#detailtab3">Helpful Products</a></li>*@
        
      </ul>
      <div class="tab-content detail-tabcontent" id="myTabContent">
        <div id="detailtab1" class="benefits-detailtab tab-pane fade in active">
        <ul class="list-unstyled list-inline detailpage-iconList" id="tipBenifitIcon">
                                    <li>
                                        <img src="@Url.Content("~/images/detail-page-img/health_icon.png")" alt="">
                                        <span>Health & Savings</span></li>
                                    <li>
                                        <img src="@Url.Content("~/images/detail-page-img/avoid_icon.png")" alt="">
                                        <span>Avoiding Unscheduled Repairs</span></li>
                                    <li>
                                        <img src="@Url.Content("~/images/detail-page-img/green_icon.png")" alt="">
                                        <span>Green</span></li>
                                    <li>
                                        <img src="@Url.Content("~/images/detail-page-img/esp_icon.png")" alt="">
                                        <span>Especially For Elderly</span></li>
        </ul>
                                <p class="tabtxt-d" id="tipBenifitContent">
                                    
                                </p>
                                <div class="energy-savingDiv"><span><small id="lbltip_energy_savings_content">Energy Savings:</small> <span id="tip_energy_savings_content">$35 per year (estimated)</span></span> <span class="energy-savingDiv-img">
                                    <img id="tip_energy_savings_score" src="@Url.Content("~/images/detail-page-img/energy_icon.png")" alt="" style="width: 18%;" /></span></div>
<br />
                                
        </div>
        <div id="detailtab2" class="Costs-detailtab tab-pane fade ">
                               
          <ul class="list-unstyled list-inline detailpage-iconList">
                                    <li>
                                        <img id="tip_cost_score"  src="@Url.Content("~/images/task/costs icons0.png")" style="width: 30%;" />
                                    <li>
        </ul>
                                       
                               
                                <p class="tabtxt-d" id="tip_cost_content"></p>
                              
        </div>
        

      </div>

</div>
                    
                  </div>
                 <div class="web-next-pre-detailpage">
                <ul class="nav navbar-nav">
                    <li class="previous-detailpage"><a href="javascript:void(0);" class="btnPreviousTip" data-taskCode="">
                        <img src="@Url.Content("~/images/detail-page-img/pre_icon.png")" alt="" /></a></li>
                    <li class="previous-detailpage-txt selected"><a id="" class="btnPreviousTip" data-taskCode="">Previous Tip
                    </a></li>
                    <li class="next-detailpage-txt"><a id="" href="javascript:void(0);" class="btnNextTip" data-taskCode="">Next Tip
                    </a></li>
                    <li class="next-detailpage"><a href="javascript:void(0);" class="btnNextTip" data-taskCode="">
                        <img src="@Url.Content("~/images/detail-page-img/next_icon.png")" alt="" /></a></li>
                </ul>
            </div>
                 
                   <div class="mobile-menu navbar-fixed-bottom mobile-menu-detailpage">
             
           
                <div class="menu">
                    <ul class="nav navbar-nav">
                        <li class="active previous-detailpage"><a id="btnPreviousTip" href="javascript:void(0);" class="ui-link btnPreviousTip" data-taskCode="">Previous Tip
                        </a></li>
                        <li class="next-detailpage"><a id="btnNextTip" href="javascript:void(0);" class="ui-link btnNextTip" data-taskCode="">Next Tip
                        </a></li>

                </ul>
            </div>
            </div>
                
                </div>
              </div>
            </div>
            </div>


<script>
    var oldHomeNumberTip = "";
    
   $(function () {
       oldHomeNumberTip = $("#getHomeNameTip").val();
       checkforIphone();
   });

   function checkforIphone() {
       if ($("#hdnSessionValue").val() != '') {
           if ($("#hdnSessionValue").val() == "@HomeCareLibrary.Constants.ApplicationModeConstants.IPHONE_APP" || $("#hdnSessionValue").val() == "@HomeCareLibrary.Constants.ApplicationModeConstants.IPAD_APP") {
                
                $(".mobileMenu").show();
            }
        }

   }

  

</script>
